<% layout('/layouts/default.html', {title: '商品评论列表', libs: ['dataGrid']}){ %>
<div class="main-content">
	<div class="box box-main">
		<div class="box-header">
			<div class="box-title">
				<i class="fa fa-list-alt"></i> ${text('售后列表')}
			</div>
			<div class="box-tools pull-right">
				<a href="#" class="btn btn-default" id="btnSearch" title="${text('查询')}"><i class="fa fa-filter"></i> ${text('查询')}</a>
				
			</div>
		</div>
		<div class="box-body">
			<#form:form id="searchForm" model="${ztCustomer}" action="${ctx}/ztCustomer/listData" method="post" class="form-inline hide"
					data-page-no="${parameter.pageNo}" data-page-size="${parameter.pageSize}" data-order-by="${parameter.orderBy}">
				
				<div class="form-group">
					<label class="control-label">${text('订单')}：</label>
					<div class="control-inline">
						<#form:input path="orderid" maxlength="150" class="form-control width-120"/>
					</div>
				</div>
				
				<div class="form-group">
					<button type="submit" class="btn btn-primary btn-sm">${text('查询')}</button>
					<button type="reset" class="btn btn-default btn-sm">${text('重置')}</button>
				</div>
			</#form:form>
			<table id="dataGrid"></table>
			<div id="dataGridPage"></div>
		</div>
	</div>
</div>
<% } %>
<script>
// 初始化DataGrid对象
$('#dataGrid').dataGrid({
	searchForm: $("#searchForm"),
	columnModel: [     
		{header:'${text('订单号')}', name:'orderid', index:'a.orderid', width:110, align:"center"},
		{header:'${text('小程序用户名')}', name:'ztAdmin.name', index:'u10.name', width:110, align:"center"},
		{header:'${text('type')}', name:'type', index:'a.type', width:258, align:"center"},
		{header:'${text('内容')}', name:'content', index:'a.content', width:500, align:"center"},
		
		{header:'${text('图片')}', name:'imgs', index:'a.imgs', width:250, align:"center", formatter: function(val, obj, row, act){
			
			var imgsArr=val.split("&*&");	
			var imr="";
			 for ( var i = 0; i <imgsArr.length; i++){
				   
				   imr+='<img style="width:40px;height:40px;" src="'+imgsArr[i]+'"></img>&nbsp;';
				}
			
			return imr;
		}},			
		{header:'${text('售后时间')}', name:'createDate', index:'a.create_date', width:150, align:"center"}
		
				
		
	],
	// 加载成功后执行事件
	ajaxSuccess: function(data){
		
	}
});
</script>